from __future__ import annotations
from abc import ABC, abstractmethod

class IApplication(ABC):
    @abstractmethod
    def init(self) -> bool:
        pass

    @abstractmethod
    def deinit(self) -> bool:
        pass

    @abstractmethod
    def args(self) -> IApplication:
        pass
    @abstractmethod
    def configure(self) -> IApplication:
        pass

    @abstractmethod
    def run(self) -> IApplication:
        pass

    @abstractmethod
    def stop(self) -> bool:
        pass
        return True

class Application(IApplication):
    def init(self) -> bool:
        return True

    def deinit(self) -> bool:
        return True

    def args(self) -> IApplication:
        return self

    def configure(self) -> IApplication:
        return self

    def run(self) -> IApplication:
        return self

    def stop(self) -> bool:
        return True



class ClientApplication(Application):
    pass

class ServerApplication(Application):
    pass


import unittest 
class TestApplication(unittest.TestCase):
    def test_client(self):
        ClientApplication().args().configure().run()

    def test_server(self):
        ServerApplication().args().configure().run().stop()
